package com.sz.zhiling.controller;

import com.sz.zhiling.mapper.FansMapper;
import com.sz.zhiling.service.FansService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/fans")
public class FansController {
    @Autowired
    private FansService fansService;
    @RequestMapping("/AllFans")
    public String getAllFans(Model model){
        model.addAttribute("fans",fansService.findAllFans());
        return "home";
    }
}
